<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%  
	String path = request.getContextPath();  
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>消费情况</title>
<link rel="stylesheet" href="${pageContext.request.contextPath }/js/common/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath }/js/common/bootstrap/css/bootstrap-theme.min.css">
<script src="${pageContext.request.contextPath }/js/jquery-3.1.1.min.js"></script>
<script	src="${pageContext.request.contextPath }/js/common/bootstrap/js/bootstrap.min.js"></script>
<script	src="${pageContext.request.contextPath }/js/common/bootstrapvaildator/js/bootstrapValidator.min.js"></script>
<script	src="${pageContext.request.contextPath }/js/common/bootstrapvaildator/js/language/zh_CN.js"></script>
</head>
<!-- <body style="margin: 30px;"> -->
<body>
	<!-- <div class="container"> -->
		<center>
			<!-- 条件查询表单 -->
			<form class="form-inline" action="${pageContext.request.contextPath }/proltal/zjj1/findByIdBis_custom_user2 " method="post" name="myform" id="myform">
				<table>
					<tr align="center">
						<td align="right">
							<div class="form-group">
								<label for="order_id">订单编号：</label>
								<!-- 隐藏域 -->
								<input type="hidden" name="custom_user_id" id="custom_user_id" value="${custom_user_id }"> 
							</div>
						</td>
							<td align="left">
							<div class="form-group">
								<input type="text" class="form-control" id="order_id" name="order_id" value="${order_id }" >
							</div>
						</td>
						<td align="right">
							<div class="form-group">
								<label for="order_content">消费内容：</label>
							</div>
						</td>
						<td align="left">
							<div class="form-group">
								<input type="text" class="form-control" id="order_content" name="order_content" value="${order_content }">
							</div>
						</td>
						<td align="right">
							<div class="form-group">
								<label for="pay_way">支付方式：</label>
							</div>
						</td>
							<td align="left">
							<div class="form-group">
								<select class="form-control" name="pay_way" id="pay_way">
									<option value="" selected="selected">请选择~！</option>
									<option value="1">微信</option>
									<option value="2">支付宝</option>
									<option value="3">美颜币</option>
									<option value="4">套餐</option>
								</select>
							</div>
						</td>
						<td>
							<button class="btn btn-primary btn-sm" type="submit" name="zjjinquiry" id="zjjinquiry">
								<span class="glyphicon glyphicon-search" aria-hidden="true"></span>&nbsp;&nbsp;查询
							</button>
								&nbsp;&nbsp;
							<button class="btn btn-primary btn-sm" type="button" name="zjjresetting" id="zjjresetting">
								<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>&nbsp;&nbsp;重置
							</button>
							&nbsp;&nbsp;
							<a href="${pageContext.request.contextPath }/proltal/zjj1/selectBis_custom_user1">
								<button class="btn btn-primary btn-sm" type="button">
									<span class="glyphicon glyphicon-off" aria-hidden="true"></span>&nbsp;&nbsp;返回
								</button>
							</a>
						</td>
					</tr>
				</table>
			</form>
			
			<table class="table table-bordered table-condensed table-hover">
				<tr align="center">
					<td></td>
					<td>顾客账户</td>
					<td>顾客姓名</td>
					<td>订单编号</td>
					<td>消费内容</td>
					<td>价格（元）</td>
					<td>支付方式</td>
					<td>实付金额（元）</td>
					<td>消耗颜值</td>
					<td>服务员工</td>
					<td>操作员工</td>
					<td>支付时间</td>
					<td>完成时间</td>				
				</tr>
				<c:forEach items="${info.list }" var="list" varStatus="s">
					<tr align="center">
						<td>${s.index+1 }</td>
						<td>${list.mobile }</td>
						<td>${list.username }</td>
						<td>${list.order_id }</td>
						<td>${list.order_content }</td>
						<td>${list.order_money }</td>
						<td>
							<c:if test="${list.pay_way==1 }">
								微信
							</c:if>
							<c:if test="${list.pay_way==2 }">
								支付宝
							</c:if>
							<c:if test="${list.pay_way==3 }">
								美颜币
							</c:if>
							<c:if test="${list.pay_way==4 }">
								套餐
							</c:if>
						</td>
						<td>${list.pay_money }</td>
						<td>${list.extend_beauty_num }</td>
						<td>${list.server_user_id }</td>
						<td>${list.handle_user_id }</td>
						<td>${list.pay_time }</td>
						<td>${list.finish_time }</td>
					</tr>
				</c:forEach>
			</table>
			
			<!-- 分页 -->
			<a href="#" onclick="first()">首页</a> &nbsp;&nbsp;&nbsp;
			<a href="#" onclick="pre()">上一页</a> &nbsp;&nbsp;&nbsp;
			<a href="#" onclick="next()">下一页</a> &nbsp;&nbsp;&nbsp;
			<a href="#" onclick="last()">尾页</a>
			
		</center>
	<!-- </div> -->
</body>
</html>
<script type="text/javascript">
	//条件查询定值方法
	$(function(){
		$("#pay_way").val('${pay_way}');
	})
	
	//分页
	//首页
	function first(){
		document.forms[0].action="${pageContext.request.contextPath }/proltal/zjj1/findByIdBis_custom_user2?page=${info.firstPage}";
		document.forms[0].submit();lase
	}
	//上一页
	function pre(){
		document.forms[0].action="${pageContext.request.contextPath }/proltal/zjj1/findByIdBis_custom_user2?page=${info.prePage}";
		document.forms[0].submit();
	}
	//下一页
	function next(){
		document.forms[0].action="${pageContext.request.contextPath }/proltal/zjj1/findByIdBis_custom_user2?page=${info.nextPage}";
		document.forms[0].submit();
	}
	//尾页
	function last(){
		document.forms[0].action="${pageContext.request.contextPath }/proltal/zjj1/findByIdBis_custom_user2?page=${info.lastPage}";
		document.forms[0].submit();
	}
	
	//点击重置按钮 重置
	$("#zjjresetting").click(
		function() {
			$("#order_id").val("");
			$("#order_content").val("");
			$("#pay_way").val("");
		}
	);
	
</script>